import java.util.Scanner;

public class book {
    static int books = 0;
    static String[] BookISBN = new String[10];
    static String[] Bookname = new String[10];
    static String[] Bookpublic = new String[10];
    static String[] Bookworker = new String[10];
    static int[] Bookpay = new int[10];

    public void insert() {
        System.out.println("请输入图书ISBN");
        Scanner scanI = new Scanner(System.in);
        String a = scanI.next();
        System.out.println("请输入图书名");
        Scanner scanII = new Scanner(System.in);
        String b = scanII.next();
        System.out.println("请输入图书价格");
        Scanner scanIIIII = new Scanner(System.in);
        int f = scanIIIII.nextInt();
        System.out.println("请输入图书出版社");
        Scanner scanIII = new Scanner(System.in);
        String c = scanIII.next();
        System.out.println("请输入图书作者");
        Scanner scanIIII = new Scanner(System.in);
        String d = scanIIII.next();
        System.out.println("添加成功!!!");
        books++;
        if (books < BookISBN.length) {
            BookISBN[books] = a;
            Bookname[books] = b;
            Bookpay[books] = f;
            Bookpublic[books] = c;
            Bookworker[books] = d;
        }
    }
    public void delete() {
        System.out.println("请输入你要删除的开发商");
        Scanner scanO = new Scanner(System.in);
        String scan1 = scanO.next();
        for (int i = 0; i < Bookpublic.length; i++) {
            if (scan1.equals(Bookpublic[i])) {
                Bookpublic[i] = "  ";
                System.out.println("删除成功");
            }
        }
    }
    public void update() {
        System.out.println("请输入图书ISBN");
        Scanner s1 = new Scanner(System.in);
        String a1 = s1.next();
        System.out.println("请输入新图书名称");
        Scanner s2 = new Scanner(System.in);
        String a2 = s2.next();
        System.out.println("请输入新图书价格");
        Scanner s3 = new Scanner(System.in);
        int a3 = s3.nextInt();
        System.out.println("请输入新图书出版社");
        Scanner s4 = new Scanner(System.in);
        String a4 = s4.next();
        System.out.println("请输入新图书作者");
        Scanner s5 = new Scanner(System.in);
        String a5 = s5.next();
        for (int i = 0; i < BookISBN.length; i++) {
            if (a1.equals(BookISBN[i])) {
                a2 = Bookname[i];
                a3 = Bookpay[i];
                a4 = Bookpublic[i];
                a5 = Bookworker[i];
                System.out.println("更新成功");
            }
        }
    }
    public void inquire() {
        System.out.println("请输入查询类型  1ISBN  2书名  3出版社  4作者  5价格范围  6查询所有  7返回  ");
        Scanner aaa = new Scanner(System.in);
        int aaa1 = aaa.nextInt();
        if (aaa1 == 1) {
            Scanner aaaa = new Scanner(System.in);
            String AAAA1 = aaaa.next();
            for (int i = 0; i < BookISBN.length; i++) {
                if (AAAA1.equals(BookISBN[i])) {
                    System.out.println("ISBN   书名   价格   出版社   作家   ");
                    System.out.println(BookISBN[i] + Bookname[i] + Bookpay[i] + Bookpublic[i] + Bookworker[i]);
                }
            }
        }
        if (aaa1 == 2) {
            Scanner aaaa1 = new Scanner(System.in);
            String AAAA2 = aaaa1.next();
            for (int i = 0; i < Bookname.length; i++) {
                if (AAAA2.equals(Bookname[i])) {
                    System.out.println("ISBN   书名   价格   出版社   作家   ");
                    System.out.println(BookISBN[i] + Bookname[i] + Bookpay[i] + Bookpublic[i] + Bookworker[i]);
                }
            }
        }
        if (aaa1 == 3) {
            Scanner aaaa2 = new Scanner(System.in);
            String AAAA3 = aaaa2.next();
            for (int i = 0; i < Bookpublic.length; i++) {
                if (AAAA3.equals(Bookpublic[i])) {
                    System.out.println("ISBN   书名   价格   出版社   作家   ");
                    System.out.println(BookISBN[i] + Bookname[i] + Bookpay[i] + Bookpublic[i] + Bookworker[i]);
                }
            }
        }
        if (aaa1 == 4) {
            Scanner aaaa3 = new Scanner(System.in);
            String AAAA4 = aaaa3.next();
            for (int i = 0; i < Bookworker.length; i++) {
                if (AAAA4.equals(Bookworker[i])) {
                    System.out.println("ISBN   书名   价格   出版社   作家   ");
                    System.out.println(BookISBN[i] + Bookname[i] + Bookpay[i] + Bookpublic[i] + Bookworker[i]);
                }
            }
        }
        if (aaa1 == 5) {
            System.out.println("请输入最低价格");
            Scanner t = new Scanner(System.in);
            int t1 = t.nextInt();
            System.out.println("请输入最高价格");
            Scanner t3 = new Scanner(System.in);
            int t2 = t3.nextInt();
            for (int i = 0; i < Bookpay.length; i++) {
                if (Bookpay[i] <= t2 && Bookpay[i] >= t1) {
                    System.out.println("ISBN   书名   价格   出版社   作家   ");
                    System.out.println(BookISBN[i] + Bookname[i] + Bookpay[i] + Bookpublic[i] + Bookworker[i]);
                }
            }
        }
        if (aaa1 == 6) {
            System.out.println("ISBN   书名   价格   出版社   作家   ");
            for (int i = 0; i < BookISBN.length; i++) {
                System.out.println(BookISBN[i] + Bookname[i] + Bookpay[i] + Bookpublic[i] + Bookworker[i]);
            }
        }
        if (aaa1 == 7) {
            return;
        }
    }
}